package com.zuihai.app.mvp.ui.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.jess.arms.base.BaseHolder;
import com.jess.arms.base.DefaultAdapter;
import com.zuihai.app.R;
import com.zuihai.app.mvp.ui.holder.DynamicItemHolder;

import java.util.List;

/**
 * Created by Zc on 2017/4/25.
 */

public class DynamicColumnAdapter extends DefaultAdapter<DynamicItemHolder.DynamicItem> {

    private Context context;
    private int id;

    public DynamicColumnAdapter(Context context, List<DynamicItemHolder.DynamicItem> datas) {
        super(datas);
        this.context = context;
    }
    public DynamicColumnAdapter(Context context, List<DynamicItemHolder.DynamicItem> datas,int id) {
        super(datas);
        this.context = context;
        this.id=id;
    }

    @Override
    public BaseHolder<DynamicItemHolder.DynamicItem> getHolder(ViewGroup parent, int viewType) {
        View itemView = LayoutInflater.from(context).inflate(R.layout.item_dynamic_column, null, false);
        return new DynamicItemHolder(itemView,context);
    }

}
